using System;
using Seditious.NETMF.MuDB;

namespace MuDBApp
{
    [Serializable]
    public class Product
    {
        [PrimaryKey]
        public int Id;
        
        [Unique]
        public string Name;
        
        public float Cost;

        public Product(int id, string name, float cost)
        {
            this.Id = id;
            this.Name = name;
            this.Cost = cost;
        }

        public override string ToString()
        {
            return "Id:" + this.Id.ToString() + ", Name: " + this.Name + ", Cost: $" + this.Cost;
        }
    }

    [Serializable]
    public class Customer
    {
        [PrimaryKey]
        public int Id;

        public string Firstname;
        public string Lastname;

        public Customer(int id, string firstname, string lastname)
        {
            this.Id = id;
            this.Firstname = firstname;
            this.Lastname = lastname;
        }

        public override string ToString()
        {
            return "Id:" + this.Id.ToString() + ", Name: " + this.Firstname + " " + this.Lastname;
        }
    }

}
